﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Data;
using System.Data.SqlClient;

/// <summary>
/// Summary description for NhatDatBaiDangDAO
/// </summary>
public class NhatDatBaiDangDAO
{
    ConnectionDB ConDB;
	public NhatDatBaiDangDAO()
	{
        ConDB = new ConnectionDB();
	}

    public DataTable GetDataLimit(int rowCount)
    {
        string sql = string.Format("SELECT TOP {0} * "
            + " FROM T_NHA_DAT_CT ND INNER JOIN T_LOAI_TIEN LT ON(ND.IDDonVi = LT.ID)" 
            + " ORDER BY ND.NgayDang DESC", rowCount);
        return ConDB.ExecuteQuery(sql, null);
    }
}